<template>
    <div>
        hello dashboard
        <div>
            <el-button type="primary" @click="logout">退出</el-button>
        </div>
    </div>
</template>
<script>
export default {
    name: 'dashboard',
    created() {
        console.log('enter dashboard1')
    },
    methods: {
        logout() {
            sessionStorage.setItem('username', '')
            this.$router.push({path: '/login'})
        }
    },
}
</script>
<style lang="scope">
    
</style>